<template>
  <view class="demo-container">
    <!-- 基础用法 -->
    <view class="demo-block">
      <view class="demo-block__title">基础用法</view>
      <view class="demo-block__content">
        <fu-number-box v-model="value1" />
        <view class="demo-block__value">当前值：{{ value1 }}</view>
      </view>
    </view>
    
    <!-- 设置步长 -->
    <view class="demo-block">
      <view class="demo-block__title">设置步长</view>
      <view class="demo-block__content">
        <fu-number-box v-model="value2" :step="5" />
      </view>
    </view>
    
    <!-- 设置范围 -->
    <view class="demo-block">
      <view class="demo-block__title">设置范围</view>
      <view class="demo-block__content">
        <fu-number-box v-model="value3" :min="-5" :max="5" />
      </view>
    </view>
    
    <!-- 设置精度 -->
    <view class="demo-block">
      <view class="demo-block__title">设置精度</view>
      <view class="demo-block__content">
        <fu-number-box v-model="value4" :step="0.1" :precision="1" />
      </view>
    </view>
    
    <!-- 禁用状态 -->
    <view class="demo-block">
      <view class="demo-block__title">禁用状态</view>
      <view class="demo-block__content">
        <fu-number-box v-model="value5" disabled />
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      value1: 1,
      value2: 5,
      value3: 0,
      value4: 1.0,
      value5: 1
    }
  }
}
</script>

<style lang="scss" scoped>
.demo-container {
  padding: 20rpx;
}

.demo-block {
  margin-bottom: 30rpx;
  
  &__title {
    margin-bottom: 20rpx;
    font-size: var(--fu-font-size-lg);
    color: var(--fu-text-color);
  }
  
  &__content {
    display: flex;
    flex-direction: column;
    gap: 20rpx;
  }
  
  &__value {
    font-size: var(--fu-font-size-sm);
    color: var(--fu-text-color-secondary);
  }
}
</style> 